<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>登录</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<SCRIPT type=text/javascript src="<%=basePath%>js/jquery-1.7.1.min.js"></SCRIPT>
<link rel="stylesheet" href="<%=basePath%>css/logon.css" type="text/css">
<script type="text/javascript">
/*
$(function(){
	$("#loginbutton").bind("click",function(){
		$("#loginform").submit();
	});
});*/
$(function(){
	$('#loginId,#passwd,#valid').keydown(function(e){
		if(e.keyCode==13){
			$("#loginbutton").click(); 
		}
		});
	$("#loginbutton").bind("click",function(){
		if($("#loginId").val()=="" || $("#passwd").val()=="" || $("#valid").val()==""){
			alert("请认真输入完整信息！");
		}else{
			$("#loginform").submit();
		}
	});
	$("#resetbutton").bind("click",function(){
		$("#loginform").reset();
	});
});
</script>


  </head>
  
  <body>
  	<div><font color="red"><s:actionerror/></font>
    <form id="loginform" action="admin/login!login.action" method="post">
    	<div class="login_main">
    <div class="login_logo" > <img src="<%=basePath%>images/login_jw.jpg"  alt="图书馆标志"> </div>
    <div class="login_left"> <img class="login_pic" src="<%=basePath%>images/login_pic.png"> </div>
    <div class="login_right">
      <table cellPadding="10">
        <tr>
          <td colspan="2" align="center"><div id="inx"> 系统后台登录 </div>
            <s:if test="%{result!=null&&result!=''}">
              <div style="font-weight: bold; color: #FF0000;"> ${result } </div>
            </s:if></td>
        </tr>
        <tr>
          <td> 用户名： </td>
          <td><input name="master.name" id="TextBox1" tabindex="1"
									class="text_nor" style="width: 150px;" type="text"></td>
        </tr>
        <tr>
          <td> 密码： </td>
          <td><input name="master.password" id="TextBox2" tabindex="2"
									class="text_nor" style="width: 150px;" type="password"></td>
        </tr>
        <tr>
          <td colspan="2" align="center"><input type="submit" id="Button1" class="btn_dl" value="登录" />
            <input type="reset" class="btn_dl" value="取消" /></td>
        </tr>
      </table>
    </div>
  </div>
    	
    	
       </form>
    </div>
  </body>
</html>
